''' <summary>
''' Base class for all pages in the application.
''' </summary>
Public Class PageBase
    Inherits Page

    ''' <summary>
    ''' Override the <see cref="Page.StyleSheetTheme" /> property to use the current user's profile.
    ''' </summary>
    ''' <remarks>The reason for using the <see cref="Page.StyleSheetTheme" /> property instead of 
    ''' <see cref="Page.Theme" /> is the resulting output:
    ''' StyleSheetTheme CSS files get output at the very beginning of the &lt;head&gt; element in the source, 
    ''' whereas Theme CSS files get output at the end. We're using IE-specific conditional comments in the 
    ''' masterpage that *must* be interpreted after the main style sheet, so we have to output the link to the 
    ''' main style sheet as early as possible.</remarks>
    Public Overrides Property StyleSheetTheme() As String
        Get
            Return HttpContext.Current.Profile("StylesheetTheme").ToString()
        End Get
        Set(ByVal value As String)
            HttpContext.Current.Profile("StylesheetTheme") = value
        End Set
    End Property

End Class